﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Presentation_Layer
{
    public partial class Test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btn_generate_Click(object sender, EventArgs e)
        {
            using (TheatreEntities cntx = new TheatreEntities())
            {
                int temp = Convert.ToInt32(txt_SID.Text);
                var screen = cntx.Screens.FirstOrDefault(m => m.ScreenID == temp);
                if (screen != null)
                {
                    txt_ScreenName.Text = screen.Screen_Name;
                    txt_PSeats.Text = screen.PSeats.ToString();
                    txt_ESeats.Text = screen.ESeats.ToString();
                }
            }
        }
    }
}